# coding = utf-8
from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import CollegeAdmissionViewSet, CollegeListAPIView, MajorListAPIView, AreaListAPIView, ProvinceListAPIView, \
    CityListAPIView, WsCollegeAdmissionViewSet, WsCollegeListAPIView, WsMajorListAPIView, WsAreaListAPIView, \
    WsProvinceListAPIView, WsCityListAPIView

router = DefaultRouter()
router.register(r'admission', CollegeAdmissionViewSet, basename="admission")
router.register(r'ws_admission', WsCollegeAdmissionViewSet, basename="ws-admission")


urlpatterns = [
    path('college/', CollegeListAPIView.as_view(), name="api-college-list"),
    path('major/', MajorListAPIView.as_view(), name="api-major-list"),
    path('area/', AreaListAPIView.as_view(), name="api-area-list"),
    path('province/', ProvinceListAPIView.as_view(), name="api-province-list"),
    path('city/', CityListAPIView.as_view(), name="api-city-list"),
    # 文史类
    path('ws_college/', WsCollegeListAPIView.as_view(), name="api-ws-college-list"),
    path('ws_major/', WsMajorListAPIView.as_view(), name="api-ws-major-list"),
    path('ws_area/', WsAreaListAPIView.as_view(), name="api-ws-area-list"),
    path('ws_province/', WsProvinceListAPIView.as_view(), name="api-ws-province-list"),
    path('ws_city/', WsCityListAPIView.as_view(), name="api-ws-city-list"),
]

urlpatterns += router.urls